import requestProxy from '@/utils/request';
const { request } = requestProxy;

// 转交欠款列表顶部tab
export function getArrearsTransferTab(params) {
  return request({
    url: 'admin/arrearsTransfer/tab',
    method: 'get',
    params
  });
}
// 转交欠款列表
export function getArrearsTransferList(params) {
  return request({
    url: 'admin/arrearsTransfer/list',
    method: 'get',
    params
  });
}
// 转交欠款详情
export function getArrearsTransferDetail(id) {
  return request({
    url: `admin/arrearsTransfer/detail/${id}`,
    method: 'get'
  });
}
// 评论列表
export function getArrearsTransferComments(params) {
  return request({
    url: '/admin/arrearsTransfer/comments/list',
    method: 'get',
    params
  });
}
// 发表评论
export function addArrearsTransferComment(data) {
  return request({
    url: '/admin/arrearsTransfer/comments/add',
    method: 'post',
    data
  });
}
// 转交欠款 - 流程 - 撤销
export function revokeArrearsTransferProcess(data) {
  return request({
    url: '/admin/arrearsTransfer/process/revocation',
    method: 'post',
    data
  });
}
// 转交欠款 - 流程 - 撤回
export function recallArrearsTransferProcess(data) {
  return request({
    url: '/admin/arrearsTransfer/process/recall',
    method: 'post',
    data
  });
}
// 转交欠款-流程审批
export function auditArrearsTransferProcess(data) {
  return request({
    url: '/admin/arrearsTransfer/process/audit',
    method: 'post',
    data
  });
}
export function createArrearsTransfer(data) {
  return request({
    url: 'admin/arrearsTransfer/create',
    method: 'post',
    data
  });
}
export function editArrearsTransfer(id, data) {
  return request({
    url: `admin/arrearsTransfer/edit/${id}`,
    method: 'put',
    data
  });
}
export function storeArrearsTransferForm(data) {
  return request({
    url: 'admin/arrearsTransfer/formSubmit',
    method: 'post',
    data
  });
}
// 欠款列表删除
export function deleteArrearsTransfer(id) {
  return request({
    url: `/admin/arrearsTransfer/delete/${id}`,
    method: 'delete'
  });
}
